<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
	<head>
		<title>工序汇报</title>
		<t:base type="jquery,easyui,tools,DatePicker,utils,yongxin_css,yongxin_js,mobile_css"></t:base>
	</head>

	<script>
	$(function() {

		$.ajax({
			type : "POST",
			url : "annealerReport004Controller.do?getProcess",
			data : {},
			success : function(jsondata) {
				data = $.parseJSON(jsondata);
				var str = "";
				$(data.obj).each(
						function(i, j) {
							//console.log(j);

							str += "<span class='progress'>" + j.typename + "("
									+ j.fbcph + ")</span>";
							if (i % 6 == 0) {
								str += "<br><br>";
							}
							str += "<span >-----></span>";

							//console.log(str);

						});
				//str +=data.msg;

				console.log(str);
			     // $('#div_process').html(str);
			     
				$('.div_nprocess').each(function(i){
				    $(this).html(data.msg);
				    
				    var fnprocess=$(this).next().text();
					$(this).find('select').val(fnprocess);
				    
				});		
				
				$('#flh').val('${annealerPage.flh}');
			}
		});

		$("#save_btn").click(
				function() {
					top.$(".ui_state_highlight").hide();
					ajaxdoForm('annealerReport004Controller.do?save&fstate=1','formobj');
					$("#save_btn").hide();
				});
		
	});
	 	 
	

    </script>

	<body  scroll="no">
		<div id="wrapper">
					<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="1"
						action="annealerReport004Controller.do?save&fstate=2" beforeSubmit="checkANprocessEmpty">

						<input type="hidden" name="fhbid" class="mytxt" ignore="ignore" value="${annealerPage.fhbid}">
						<input type="hidden" name="id" class="mytxt" ignore="ignore" dataType="*" value="${annealerPage.id}">

						<table  cellpadding="0" cellspacing="1" class="formtable">
							<tr>
								<td align="center" colspan=11>
									<label class="Validform_label">
										退火炉工序汇报单
									</label>
								</td>
							</tr>
							<tr>
								<td align="center">
									<label class="Validform_label">
										生产车间
									</label>
								</td>
								<td class="value" colspan=10>
								  <!--<t:dictSelect field="fworkshop" typeGroupCode="workshop" hasLabel="false"  defaultVal="${annealerPage.fworkshop}" extendJson="{id:sel2}"></t:dictSelect>
								-->
		                           <input id="fworkshop" name="fworkshop" style="width: 140px;" class="mytxt" ignore="ignore"
										value="冷轧车间"><!--
								  <select  id="fworkshop"  name="fworkshop" onchange="selChange()">
								     <c:forEach items="${workshopList}" var="workshop">
								        <option value="${workshop.id}"   <c:if test="${workshop.id==annealerPage.fworkshop}"> selected="selected"</c:if>>${workshop.name}</option>
								     </c:forEach>
								     </select>
								--></td>
							</tr>
							<tr>
								<td align="center">
									<label class="Validform_label">
										班组
									</label>
								</td>
								<td class="value" colspan=10>
								    <t:dictSelect field="fworkgroup" typeGroupCode="team" hasLabel="false"  defaultVal="${annealerPage.fworkgroup}" extendJson="{id:sel2}"></t:dictSelect>
								</td>
							</tr>
							<tr>
								<td align="center">
									<label class="Validform_label">
										机组
									</label>
								</td>
								<td class="value" colspan=10>
									<input id="fmatchinegroup" name="fmatchinegroup" style="width: 140px;" class="mytxt" ignore="ignore"
										value="${annealerPage.fmatchinegroup}">
										<!-- 
										<select id='fmatchinegroup' name='fmatchinegroup'><option value=''>请选择</option></select>
								--></td>
							</tr>
							<tr style="display: none">
								<td align="center">
									<label class="Validform_label">
										制单人
									</label>
								</td>
								<td class="value" colspan=10>
									<input id="createBy" name="createBy" class="mytxt" style="width: 140px;" ignore="ignore" readOnly
										value="${annealerPage.createBy}">
									<input type="hidden" id="createDate" name="createDate"
										value="<fmt:formatDate value='${annealerPage.createDate}' 
						type="date" pattern="yyyy-MM-dd hh:mm:ss"/>">
								</td>
							</tr>
							<tr>
								<td align="center">
									<label class="Validform_label">
										进炉时间
									</label>
								</td>
								<td class="value" colspan=2>
									<input class="mytxt" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width: 140px" id="fjldate"
										name="fjldate" class="mytxt" ignore="ignore"
										value="<fmt:formatDate value='${annealerPage.fjldate}' 
						type="date" pattern="yyyy-MM-dd hh:mm:ss"/>"  ReadOnly>
								</td>
								<td align="center">
									<label class="Validform_label">
										出炉时间
									</label>
								</td>
								<td class="value" colspan=6>
									<input class="mytxt" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width: 140px" id="fcldate"
										name="fcldate" class="mytxt" ignore="ignore"
										value="<fmt:formatDate value='${annealerPage.fcldate}' 
						type="date" pattern="yyyy-MM-dd hh:mm:ss"/>">
								</td>
							</tr>

							<tr>
								<td align="center">
									<label class="Validform_label">
										炉号
									</label>
								</td>
								<td align="center">
									<label class="Validform_label">
										本厂批号
									</label>
								</td>
								<td align="center">
									<label class="Validform_label">
										投入厚度
									</label>
								</td>
								<td align="center">
									<label class="Validform_label">
										投入宽度
									</label>
								</td>
								<td align="center">
									<label class="Validform_label">
										投入重量
									</label>
								</td>

								<td align="center">
									<label class="Validform_label">
										下一工序
									</label>
								</td>
							</tr>

							<c:if test="${fn:length(processReportList)  > 0 }">
								<c:forEach items="${processReportList}" var="poVal" varStatus="stuts">
									<input id="pid" name="pid" type="hidden" value="${poVal.id}" style="width: 100px">
									<tr id="record_tr" class="trRecord">
										<c:if test="${stuts.index==0}">
											<td align="center" class="value" rowspan=7>
												<select id="flh" name="flh">
													<option value="">
														--请选择--
													</option>
													<option value="1号炉">
														1号炉
													</option>
													<option value="2号炉">
														2号炉
													</option>
													<option value="3号炉">
														3号炉
													</option>
													<option value="4号炉">
														4号炉
													</option>
													<option value="5号炉">
														5号炉
													</option>
													<option value="6号炉">
														6号炉
													</option>
													<option value="7号炉">
														7号炉
													</option>
													<option value="8号炉">
														8号炉
													</option>
													<option value="9号炉">
														9号炉
													</option>
													<option value="10号炉">
														10号炉
													</option>
													<option value="11号炉">
														11号炉
													</option>
													<option value="12号炉">
														12号炉
													</option>
													<option value="13号炉">
														13号炉
													</option>
													<option value="14号炉">
														14号炉
													</option>
													<option value="15号炉">
														15号炉
													</option>
													<option value="16号炉">
														16号炉
													</option>
													<option value="17号炉">
														17号炉
													</option>
													<option value="18号炉">
														18号炉
													</option>
													<option value="19号炉">
														19号炉
													</option>
													<option value="20号炉">
														20号炉
													</option>
												</select>

											</td>
										</c:if>
										<td align="center" class="value">
											<input id="fbcph" name="fbcph" class="mytxt" ignore="ignore" value="${poVal.fbcph}" style="width: 120px" ReadOnly>
											<input  name="fwlname"  value="${poVal.fwlname}" type="hidden">
										</td>
										<td align="center" class="value">

											<input id="ftrhd" name="ftrhd" class="mytxt" ignore="ignore" value="${poVal.ftrhd}" ReadOnly>
										</td>
										<td align="center" class="value">
											<input id="ftrkd" name="ftrkd" class="mytxt" ignore="ignore" value="${poVal.ftrkd}" ReadOnly>
										</td>
										<td align="center" class="value">
											<input id="ftrzl" name="ftrzl" class="mytxt" ignore="ignore" value="${poVal.ftrzl}" ReadOnly>
										</td>
										<td align="center" class="value" >
											<div id="div_nprocess" class="div_nprocess"></div><span style="display:none">${poVal.nprocess}</span>
										</td>
									</tr>
								</c:forEach>
							</c:if>

						</table>

						<div style="margin-top: 20px;">
							<table  cellpadding="0" cellspacing="1" class="formtable">
								<tr>
									<td align="center" colspan=7>
										<label class="Validform_label">
											退火工艺
										</label>
									</td>
								</tr>
								<tr>
									<td align="center" ;" nowrap>
										<label class="Validform_label">
											设定温度
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											操作人
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											升温时间
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											操作人
										</label>
									</td>
									<td align="center" nowrap>
										<label class="Validform_label">
											保温时间
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											操作人
										</label>
									</td>
								</tr>
								<tr>
									<td align="center" class="value">
										<input id="fdzsj" name="fsdwd" style="width: 140px" class="mytxt" ignore="ignore" dataType="d"
											value="${annealerPage.fsdwd}">
									</td>
									<td align="center" class="value">
										<input id="fdzsj" name="foperator1" class="mytxt" ignore="ignore" dataType="*" value="${annealerPage.foperator1}"
											readonly="readonly">
									</td>
									<td align="center" class="value">
										<input class="mytxt" style="width: 140px" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="fswsj"
											name="fswsj" class="mytxt" ignore="ignore"
											value="<fmt:formatDate value='${annealerPage.fswsj}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>">
									</td>
									<td align="center" class="value">
										<input id="fdzsj" name="foperator2" class="mytxt" ignore="ignore" dataType="*" value="${annealerPage.foperator2}"
											readonly="readonly">
									</td>
									<td align="center" class="value">
										<input class="mytxt" style="width: 140px" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="fbwsj"
											name="fbwsj" class="mytxt" ignore="ignore"
											value="<fmt:formatDate value='${annealerPage.fbwsj}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>">
									</td>
									<td align="center" class="value">
										<input id="fdzsj" name="foperator3" class="mytxt" ignore="ignore" dataType="*" value="${annealerPage.foperator3}"
											readonly="readonly">
									</td>
								</tr>
								<tr>
									<td align="center"  nowrap>
										<label class="Validform_label">
											吊罩时间
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											操作人
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											吊罩温度
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											操作人
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											水冷时间
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											操作人
										</label>
									</td>
								</tr>
								<tr>
									<td align="center" class="value">
										<input style="width: 140px" class="mytxt" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="fdzsj"
											name="fdzsj" class="mytxt" ignore="ignore"
											value="<fmt:formatDate value='${annealerPage.fdzsj}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>">
									</td>
									<td align="center" class="value">
										<input id="fdzsj" name="foperator4" class="mytxt" ignore="ignore" dataType="*" value="${annealerPage.foperator4}"
											readonly="readonly">
									</td>
									<td align="center" class="value">
										<input id="fdzsj" name="fdzwd" style="width: 140px" class="mytxt" ignore="ignore" dataType="d"
											value="${annealerPage.fdzwd}">
									</td>
									<td align="center" class="value">
										<input id="fdzsj" name="foperator5" class="mytxt" ignore="ignore" dataType="*" value="${annealerPage.foperator5}"
											readonly="readonly">
									</td>
									<td align="center" class="value">
										<input class="mytxt" style="width: 140px" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="fslsj"
											name="fslsj" class="mytxt" ignore="ignore"
											value="<fmt:formatDate value='${annealerPage.fslsj}' type="date" pattern="yyyy-MM-dd HH:mm:ss"/>">
									</td>
									<td align="center" class="value">
										<input id="fdzsj" name="foperator6" class="mytxt" ignore="ignore" dataType="*" value="${annealerPage.foperator6}"
											readonly="readonly">
									</td>
								</tr>

								<tr>
									<td align="center"  nowrap>
										<label class="Validform_label">
											水冷温度
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											操作人
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											出炉温度
										</label>
									</td>
									<td align="center"  nowrap>
										<label class="Validform_label">
											操作人
										</label>
									</td>
									<td align="center"  nowrap colspan="2">
										<label class="Validform_label">
											 备注
										</label>
									</td>
								</tr>

								<tr>
									<td align="center" class="value">
										<input id="fslwd" name="fslwd" style="width: 140px" class="mytxt" ignore="ignore" dataType="d"
											value="${annealerPage.fslwd}">
									</td>
									<td align="center" class="value">
										<input id="foperator7" name="foperator7" class="mytxt" ignore="ignore" dataType="*"
											value="${annealerPage.foperator7}" readonly="readonly">
									</td>
									<td align="center" class="value">
										<input id="fclwd" name="fclwd" style="width: 140px" class="mytxt" ignore="ignore" dataType="d"
											value="${annealerPage.fclwd}">
									</td>
									<td align="center" class="value">
										<input id="foperator8" name="foperator8" class="mytxt" ignore="ignore" dataType="*"
											value="${annealerPage.foperator8}" readonly="readonly">
									</td>
									<td align="center" class="value" colspan="2">
										<input value="${annealerPage.fnote}" class="mytxt" style="width: 150px" name="fnote" ignore="ignore" dataType="*">
									</td>
								</tr>
							</table>
						</div>

						<div style="margin-top: 10px;">
							<a href="#" class="easyui-linkbutton btn" iconCls="icon-save" id="save_btn">保存</a>
						</div>
					</t:formvalid>
		</div>
	</body>